/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "contabil_conta")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ContabilConta.findAll", query = "SELECT c FROM ContabilConta c")})
public class ContabilConta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    @Column(length = 30)
    private String classificacao;
    private Character tipo;
    @Column(length = 100)
    private String descricao;
    @Column(name = "DATA_INCLUSAO")
    @Temporal(TemporalType.DATE)
    private Date dataInclusao;
    private Character situacao;
    private Character natureza;
    @Column(name = "PATRIMONIO_RESULTADO")
    private Character patrimonioResultado;
    @Column(name = "LIVRO_CAIXA")
    private Character livroCaixa;
    private Character dfc;
    @Column(length = 20)
    private String ordem;
    @Column(name = "CODIGO_REDUZIDO", length = 10)
    private String codigoReduzido;
    @Column(name = "CODIGO_EFD", length = 2)
    private String codigoEfd;
    @OneToMany(mappedBy = "idContabilConta")
    private List<Cliente> clienteList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<ContaCaixa> contaCaixaList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idContabilConta")
    private List<ContabilDreVinculo> contabilDreVinculoList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<Transportadora> transportadoraList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<Sindicato> sindicatoList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idContabilConta")
    private List<ContabilLancaProgramadoDet> contabilLancaProgramadoDetList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<Fornecedor> fornecedorList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<OperadoraPlanoSaude> operadoraPlanoSaudeList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idContabilConta")
    private List<ContaContabilRateio> contaContabilRateioList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<EmpresaTransporte> empresaTransporteList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<Colaborador> colaboradorList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<Convenio> convenioList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<OperadoraCartao> operadoraCartaoList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<Contrato> contratoList;
    @OneToMany(mappedBy = "idContabilConta")
    private List<ContabilConta> contabilContaList;
    @JoinColumn(name = "ID_CONTABIL_CONTA", referencedColumnName = "ID")
    @ManyToOne
    private ContabilConta idContabilConta;
    @JoinColumn(name = "ID_PLANO_CONTA", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private PlanoConta idPlanoConta;
    @JoinColumn(name = "ID_PLANO_CONTA_REF_SPED", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private PlanoContaRefSped idPlanoContaRefSped;
    @OneToMany(mappedBy = "idContabilConta")
    private List<NaturezaFinanceira> naturezaFinanceiraList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idContabilConta")
    private List<ContabilLancamentoOrcado> contabilLancamentoOrcadoList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idContabilConta")
    private List<ContabilEncerramentoExeDet> contabilEncerramentoExeDetList;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "idContabilConta")
    private List<ContabilLancamentoDetalhe> contabilLancamentoDetalheList;

    public ContabilConta() {
    }

    public ContabilConta(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getClassificacao() {
        return classificacao;
    }

    public void setClassificacao(String classificacao) {
        this.classificacao = classificacao;
    }

    public Character getTipo() {
        return tipo;
    }

    public void setTipo(Character tipo) {
        this.tipo = tipo;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public Date getDataInclusao() {
        return dataInclusao;
    }

    public void setDataInclusao(Date dataInclusao) {
        this.dataInclusao = dataInclusao;
    }

    public Character getSituacao() {
        return situacao;
    }

    public void setSituacao(Character situacao) {
        this.situacao = situacao;
    }

    public Character getNatureza() {
        return natureza;
    }

    public void setNatureza(Character natureza) {
        this.natureza = natureza;
    }

    public Character getPatrimonioResultado() {
        return patrimonioResultado;
    }

    public void setPatrimonioResultado(Character patrimonioResultado) {
        this.patrimonioResultado = patrimonioResultado;
    }

    public Character getLivroCaixa() {
        return livroCaixa;
    }

    public void setLivroCaixa(Character livroCaixa) {
        this.livroCaixa = livroCaixa;
    }

    public Character getDfc() {
        return dfc;
    }

    public void setDfc(Character dfc) {
        this.dfc = dfc;
    }

    public String getOrdem() {
        return ordem;
    }

    public void setOrdem(String ordem) {
        this.ordem = ordem;
    }

    public String getCodigoReduzido() {
        return codigoReduzido;
    }

    public void setCodigoReduzido(String codigoReduzido) {
        this.codigoReduzido = codigoReduzido;
    }

    public String getCodigoEfd() {
        return codigoEfd;
    }

    public void setCodigoEfd(String codigoEfd) {
        this.codigoEfd = codigoEfd;
    }

    @XmlTransient
    public List<Cliente> getClienteList() {
        return clienteList;
    }

    public void setClienteList(List<Cliente> clienteList) {
        this.clienteList = clienteList;
    }

    @XmlTransient
    public List<ContaCaixa> getContaCaixaList() {
        return contaCaixaList;
    }

    public void setContaCaixaList(List<ContaCaixa> contaCaixaList) {
        this.contaCaixaList = contaCaixaList;
    }

    @XmlTransient
    public List<ContabilDreVinculo> getContabilDreVinculoList() {
        return contabilDreVinculoList;
    }

    public void setContabilDreVinculoList(List<ContabilDreVinculo> contabilDreVinculoList) {
        this.contabilDreVinculoList = contabilDreVinculoList;
    }

    @XmlTransient
    public List<Transportadora> getTransportadoraList() {
        return transportadoraList;
    }

    public void setTransportadoraList(List<Transportadora> transportadoraList) {
        this.transportadoraList = transportadoraList;
    }

    @XmlTransient
    public List<Sindicato> getSindicatoList() {
        return sindicatoList;
    }

    public void setSindicatoList(List<Sindicato> sindicatoList) {
        this.sindicatoList = sindicatoList;
    }

    @XmlTransient
    public List<ContabilLancaProgramadoDet> getContabilLancaProgramadoDetList() {
        return contabilLancaProgramadoDetList;
    }

    public void setContabilLancaProgramadoDetList(List<ContabilLancaProgramadoDet> contabilLancaProgramadoDetList) {
        this.contabilLancaProgramadoDetList = contabilLancaProgramadoDetList;
    }

    @XmlTransient
    public List<Fornecedor> getFornecedorList() {
        return fornecedorList;
    }

    public void setFornecedorList(List<Fornecedor> fornecedorList) {
        this.fornecedorList = fornecedorList;
    }

    @XmlTransient
    public List<OperadoraPlanoSaude> getOperadoraPlanoSaudeList() {
        return operadoraPlanoSaudeList;
    }

    public void setOperadoraPlanoSaudeList(List<OperadoraPlanoSaude> operadoraPlanoSaudeList) {
        this.operadoraPlanoSaudeList = operadoraPlanoSaudeList;
    }

    @XmlTransient
    public List<ContaContabilRateio> getContaContabilRateioList() {
        return contaContabilRateioList;
    }

    public void setContaContabilRateioList(List<ContaContabilRateio> contaContabilRateioList) {
        this.contaContabilRateioList = contaContabilRateioList;
    }

    @XmlTransient
    public List<EmpresaTransporte> getEmpresaTransporteList() {
        return empresaTransporteList;
    }

    public void setEmpresaTransporteList(List<EmpresaTransporte> empresaTransporteList) {
        this.empresaTransporteList = empresaTransporteList;
    }

    @XmlTransient
    public List<Colaborador> getColaboradorList() {
        return colaboradorList;
    }

    public void setColaboradorList(List<Colaborador> colaboradorList) {
        this.colaboradorList = colaboradorList;
    }

    @XmlTransient
    public List<Convenio> getConvenioList() {
        return convenioList;
    }

    public void setConvenioList(List<Convenio> convenioList) {
        this.convenioList = convenioList;
    }

    @XmlTransient
    public List<OperadoraCartao> getOperadoraCartaoList() {
        return operadoraCartaoList;
    }

    public void setOperadoraCartaoList(List<OperadoraCartao> operadoraCartaoList) {
        this.operadoraCartaoList = operadoraCartaoList;
    }

    @XmlTransient
    public List<Contrato> getContratoList() {
        return contratoList;
    }

    public void setContratoList(List<Contrato> contratoList) {
        this.contratoList = contratoList;
    }

    @XmlTransient
    public List<ContabilConta> getContabilContaList() {
        return contabilContaList;
    }

    public void setContabilContaList(List<ContabilConta> contabilContaList) {
        this.contabilContaList = contabilContaList;
    }

    public ContabilConta getIdContabilConta() {
        return idContabilConta;
    }

    public void setIdContabilConta(ContabilConta idContabilConta) {
        this.idContabilConta = idContabilConta;
    }

    public PlanoConta getIdPlanoConta() {
        return idPlanoConta;
    }

    public void setIdPlanoConta(PlanoConta idPlanoConta) {
        this.idPlanoConta = idPlanoConta;
    }

    public PlanoContaRefSped getIdPlanoContaRefSped() {
        return idPlanoContaRefSped;
    }

    public void setIdPlanoContaRefSped(PlanoContaRefSped idPlanoContaRefSped) {
        this.idPlanoContaRefSped = idPlanoContaRefSped;
    }

    @XmlTransient
    public List<NaturezaFinanceira> getNaturezaFinanceiraList() {
        return naturezaFinanceiraList;
    }

    public void setNaturezaFinanceiraList(List<NaturezaFinanceira> naturezaFinanceiraList) {
        this.naturezaFinanceiraList = naturezaFinanceiraList;
    }

    @XmlTransient
    public List<ContabilLancamentoOrcado> getContabilLancamentoOrcadoList() {
        return contabilLancamentoOrcadoList;
    }

    public void setContabilLancamentoOrcadoList(List<ContabilLancamentoOrcado> contabilLancamentoOrcadoList) {
        this.contabilLancamentoOrcadoList = contabilLancamentoOrcadoList;
    }

    @XmlTransient
    public List<ContabilEncerramentoExeDet> getContabilEncerramentoExeDetList() {
        return contabilEncerramentoExeDetList;
    }

    public void setContabilEncerramentoExeDetList(List<ContabilEncerramentoExeDet> contabilEncerramentoExeDetList) {
        this.contabilEncerramentoExeDetList = contabilEncerramentoExeDetList;
    }

    @XmlTransient
    public List<ContabilLancamentoDetalhe> getContabilLancamentoDetalheList() {
        return contabilLancamentoDetalheList;
    }

    public void setContabilLancamentoDetalheList(List<ContabilLancamentoDetalhe> contabilLancamentoDetalheList) {
        this.contabilLancamentoDetalheList = contabilLancamentoDetalheList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ContabilConta)) {
            return false;
        }
        ContabilConta other = (ContabilConta) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.ContabilConta[ id=" + id + " ]";
    }
    
}
